<h1>Welcome <{$username}>'s Account Panel</h1>

<div class="contentContainer">
  <h2>Primary Address</h2>
  <div class="contentText">
	<{if $errorMessage != ""}>
	  <div class="inputRequirement"><{$errorMessage}></div>
	  <{/if}>
    <div class="ui-widget infoBoxContainer" style="float: right;">
      <div class="ui-widget-header infoBoxHeading">Primary Address</div>
      <div class="ui-widget-content infoBoxContents">
        <{$mainAddress->getName()}><br> <{$mainAddress->street}><br> <{$mainAddress->getState()}>, <{$mainAddress->city}>    <{$mainAddress->postCode}><br> <{$mainAddress->getCountry()}>      </div>
    </div>
    This address is used as the pre-selected shipping and billing address for orders placed on this store.<br><br>This address is also used as the base for product and service tax calculations.  </div>
  <div style="clear: both;"></div>
  <h2><{$username}>'s Address Book</h2>
  <div class="contentText">
  <{assign var=i value=0}>
  <{assign var=j value=10}>
   <{foreach item=addressEntity from=$listAddress}>
    <div>
      <span style="float: right;"><span class=""><a id="tdb<{$i}>" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount/editAddress/id/<{$addressEntity->id}>" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-document"></span>Edit</a></span><script type="text/javascript">$("#tdb<{$i}>").button({icons:{primary:"ui-icon-document"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script> <span class=""><a id="tdb<{$j}>" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount/deleteAddress/id/<{$addressEntity->id}>" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-trash"></span>Delete</a></span><script type="text/javascript">$("#tdb<{$j}>").button({icons:{primary:"ui-icon-trash"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script></span>
	  <p><strong><{$addressEntity->getName()}></strong>&nbsp;<{if $addressEntity->id == $mainAddressId}><small><i>(primary address)</i></small><{/if}></p>
      <p style="padding-left: 20px;"><{$addressEntity->getName()}><br> <{$addressEntity->street}><br> <{$addressEntity->getState()}>, <{$addressEntity->city}>    <{$addressEntity->postcode}><br> <{$addressEntity->getCountry()}></p>
	  
    </div>
	<{assign var=i value=$i+1}>
	<{assign var=j value=$j+1}>
	 <{/foreach}>
  </div>
  <div class="buttonSet">
    <span class="buttonAction"><span class=""><a id="tdb7" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount/addAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-primary ui-state-hover" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span>Add Address</a></span><script type="text/javascript">$("#tdb7").button({icons:{primary:"ui-icon-home"}}).addClass("ui-priority-primary").parent().removeClass("tdbLink");</script></span>
    <span class=""><a id="tdb8" href="<{$APPLICATION_URL}>/<{$ownerName}>MyAccount" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-w"></span>Back</a></span><script type="text/javascript">$("#tdb8").button({icons:{primary:"ui-icon-triangle-1-w"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>  </div>
  <p><font color="#ff0000"><strong>NOTE:</strong></font> A maximum of 5 address book entries allowed.</p>
</div>